package com.qk.management.mapper;

import com.qk.entity.Role;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper {
    List<Role> selectByPage(String name, Integer label);
    void insert(Role role);
    @Delete("delete from role where id = #{id}")
    void deleteById(Integer id);
    @Select("select * from role where id = #{id}")
    Role selectById(Integer id);

    void update(Role role);
    @Select("select * from role")
    List<Role> query(String list);
    @Select("select * from role where label = #{roleLabel}")
    Role selectByLabel(String roleLabel);
}
